{%- layout none -%}<?xml version="1.0" encoding="UTF-8" ?>{%- assign getVariant = false -%}
{%- capture contentForQuerystring -%}{{ content_for_header }}{%- endcapture -%}
{%- assign pageUrl = contentForQuerystring | split:'"pageurl":"' | last | split:'"' | first | split:'.myshopify.com' | last |
   replace:'\/','/' |
   replace:'%20',' ' |
   replace:'\u0026','&'
-%}
{%- for i in (1..1) -%}
  {%- assign pageQuerystring = pageUrl | split:'?' | last -%}
  {%- assign parts = pageQuerystring | split:'&' -%}
  {%- assign CollectionValue = pageQuerystring | split:'=' -%}
  {%- for part in parts -%}
	{%- assign keyAndValue = part | split:'=' -%}
    {%- if keyAndValue[0] == 'concate' -%}
		{%- capture concate -%} {{ keyAndValue[1] }}{% endcapture %}
        {% assign var = concate | split:'%7C' %}
	{% endif %}
  {%- endfor -%}
{%- endfor -%}
{% for variables in var %}
	{% assign myvar = variables | split:'__'%}
	{%- if myvar[0] == 'productIdFormat' -%}
		{%- assign productIdFormat = myvar[1] -%}
	{%- elsif myvar[0] == 'whichProducts' -%}
		{%- assign whichProducts  = myvar[1] -%}
	{%- elsif myvar[0] == 'option1Name' -%}
		{%- assign option1Name  = myvar[1]  | url_decode -%}
	{%- elsif myvar[0] == 'option2Name' -%}
		{%- assign option2Name  = myvar[1]  | url_decode -%}
	{%- elsif myvar[0] == 'option3Name' -%}
		{%- assign option3Name  = myvar[1]  | url_decode -%}
	{%- elsif myvar[0] == 'option4Name' -%}
		{%- assign option4Name  = myvar[1]  | url_decode -%}
	{%- elsif myvar[0] == 'collectionType' -%}
		{%- assign collectionType = myvar[1] -%}
	{%- elsif myvar[0] == 'productTitle' -%}
		{%- assign productTitle = myvar[1] -%}
	{%- elsif myvar[0] == 'productdescription' -%}
		{%- assign productdescription = myvar[1] -%}
	{%- elsif myvar[0] == 'variantSubmission' -%}
		{%- assign variantSubmission = myvar[1] -%}
	{%- elsif myvar[0] == 'gtinSubmission' -%}
		{%- assign gtinSubmission = myvar[1] -%}
	{%- elsif myvar[0] == 'salePrice' -%}
		{%- assign salePrice = myvar[1] -%}
	{%- elsif myvar[0] == 'secondImage' -%}
		{%- assign secondImage = myvar[1] -%}
	{%- elsif myvar[0] == 'additionalImages' -%}
		{%- assign additionalImages = myvar[1] -%}
	{%- elsif myvar[0] == 'ageGroup' -%}
		{%- assign ageGroup = myvar[1] -%}
	{%- elsif myvar[0] == 'gender' -%}
		{%- assign gender = myvar[1] -%}
	{%- elsif myvar[0] == 'productCondition' -%}
		{%- assign productCondition = myvar[1] -%}
	{%- elsif myvar[0] == 'collectionHandle' -%}
		{%- assign collectionHandle = myvar[1] -%}
    {%- elsif myvar[0] == 'collectionsId' -%}
		{%- assign collectionsId = myvar[1] -%}
    {%- elsif myvar[0] == 'brand' -%}
		{%- assign brand = myvar[1] -%}
	{%- elsif myvar[0] == 'utmTag' -%}
		{%- assign utmTag = myvar[1] -%}
	{%- elsif myvar[0] == 'DefaultGoogleProductCategory' -%}
		{%- assign DefaultGoogleProductCategory = myvar[1] -%}
	{%- elsif myvar[0] == 'upn' -%}
		{%- assign upn = myvar[1] -%}
	{%- elsif myvar[0] == 'limit' -%}
		{%- assign limit = myvar[1] -%}
	{% endif %}
{% endfor %}

{% if whichProducts == 'collection' and collectionType == 'custom' %}
    {% assign CollectionValue = collectionsId %}
{% elsif whichProducts == 'all' %}
    {% assign CollectionValue = 'all' %}
{% endif %}

{% if upn == 'null' %}
	{% assign p_limit = 50 %}
{% else %}
	{% assign p_limit = 1000  %}
{% endif %}

{% if variantSubmission == 'all' %}
	{% assign v_limit = 200 %}
{% else %}
	{% assign v_limit = 1000  %}
{% endif %}

{% assign product_count = 0 %}
<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">
    <channel>
        <title>{{shop.name | escape }}</title>
        <description>Google Product Feed</description>
        <link>{{shop.url}}</link>
        {% paginate collections[CollectionValue].products by v_limit %}
            {% for product in collections[CollectionValue].products limit:p_limit -%}
                {% assign product_count = product_count | plus:1 %}
                {% if upn == '1' and product_count >= 1000 %}
                    {% break %}
                {% endif %}
                {% if upn == 'null' and product_count >= 50 %}
                    {% break %}
                {% endif %}
                <item>
                    <title>
                    	{% if productTitle == 'default' %}
                    		<![CDATA[{{ product.title | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" | replace: "°", "" }}]]>
                    	{% elsif product.metafields.global.title_tag %}
                            {{ product.metafields.global.title_tag | strip_html | strip_newlines | escape }}
                        {% else %}
                            <![CDATA[{{ product.title | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" | replace: "°", "" }}]]>
                    	{% endif %}
                    </title>
                    <g:brand>{% if brand == 'Domain' %}{{ shop.url }}{% else %}{{product.vendor | escape }}{% endif %}</g:brand>
                    <g:product_type>{{product.type | escape }}</g:product_type>
                    <g:id>
                    	{% if productIdFormat == 'global' %}
                        	{{'Shopify_'}}{{shop.currency}}_{{product.id }}_{% for variant in product.variants limit:1%}{{variant.id}}{% endfor%}
                        {% elsif productIdFormat == 'sku' %}
                        	{% for variant in product.variants limit:1%}
                        		<![CDATA[{{ variant.sku }}]]>
                        	{% endfor%}
                        {% elsif productIdFormat == 'variant' %}
                        	{% for variant in product.variants limit:1%}{{variant.id}}{% endfor%}
                        {% endif %}
                    </g:id>
                    <g:condition>{{ productCondition }}</g:condition>
                  	<g:age_group>{{ ageGroup }}</g:age_group>
                    <g:gender>{{ gender }}</g:gender>
                    {% if productdescription == 'default' %}
                    	<description><![CDATA[{{ product.description | strip_html | strip_newlines | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "..", ". " | replace: "  ", " " | replace: "â€˜", "&#39;" | replace: "â€™", "&#39;" | replace: "&#8216;", "&#39;" | replace: "&#8217;", "&#39;" | replace: "&#8217;", "&#39;" | replace: "Ã¢â‚¬â„¢", "&#39;" | replace: "Ã¢â‚¬Å“", "&#39;" | replace: "Ã¢â‚¬Ëœ", "&#39;"  | replace: "Ã‚Â´", "&#39;" | replace: "â€œ", "&#34;" | replace: "â€", "&#34;" | replace: "&#8211;", "-" | replace: "Ã¢â‚¬â€œ", "-" | replace: "Ã¢â‚¬â€", "-" | replace: "â€“", "&mdash;" | replace: "â€”", "&mdash;" | replace: "%", "&#37;" | replace: "Ã‚Â©", "&copy;" | replace: "Ã‚Â®", "&reg;" | replace: "Ã¢â€žÂ¢", "&trade;" | replace: "Ã‚Â£", "&pound;" | replace: "Ã¯Â¿Â", "&#42;" | replace: "Ã¢â‚¬Â¢", "&#42;" | replace: "Ã¢â‚¬Â", "&#39;" | replace: "&#233;", "e" | replace: "Ã©", "e" | replace: "Ã ", "a" | replace: "Ã³", "o" | replace: "Ãª", "e" | replace: "ÃƒËœ", "O" | replace: "&#8482;", "" | replace: "&#174;", "" }}]]></description>
                    {% elsif product.metafields.global.description_tag %}
                    	<description><![CDATA[{{ product.metafields.global.description_tag | strip_html | strip_newlines | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "..", ". " | replace: "  ", " " | replace: "â€˜", "&#39;" | replace: "â€™", "&#39;" | replace: "&#8216;", "&#39;" | replace: "&#8217;", "&#39;" | replace: "&#8217;", "&#39;" | replace: "Ã¢â‚¬â„¢", "&#39;" | replace: "Ã¢â‚¬Å“", "&#39;" | replace: "Ã¢â‚¬Ëœ", "&#39;"  | replace: "Ã‚Â´", "&#39;" | replace: "â€œ", "&#34;" | replace: "â€", "&#34;" | replace: "&#8211;", "-" | replace: "Ã¢â‚¬â€œ", "-" | replace: "Ã¢â‚¬â€", "-" | replace: "â€“", "&mdash;" | replace: "â€”", "&mdash;" | replace: "%", "&#37;" | replace: "Ã‚Â©", "&copy;" | replace: "Ã‚Â®", "&reg;" | replace: "Ã¢â€žÂ¢", "&trade;" | replace: "Ã‚Â£", "&pound;" | replace: "Ã¯Â¿Â", "&#42;" | replace: "Ã¢â‚¬Â¢", "&#42;" | replace: "Ã¢â‚¬Â", "&#39;" | replace: "&#233;", "e" | replace: "Ã©", "e" | replace: "Ã ", "a" | replace: "Ã³", "o" | replace: "Ãª", "e" | replace: "ÃƒËœ", "O" | replace: "&#8482;", "" | replace: "&#174;", "" }}]]></description>
                    {% else %}
                    	<description><![CDATA[{{ product.description | strip_html | strip_newlines | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "..", ". " | replace: "  ", " " | replace: "â€˜", "&#39;" | replace: "â€™", "&#39;" | replace: "&#8216;", "&#39;" | replace: "&#8217;", "&#39;" | replace: "&#8217;", "&#39;" | replace: "Ã¢â‚¬â„¢", "&#39;" | replace: "Ã¢â‚¬Å“", "&#39;" | replace: "Ã¢â‚¬Ëœ", "&#39;"  | replace: "Ã‚Â´", "&#39;" | replace: "â€œ", "&#34;" | replace: "â€", "&#34;" | replace: "&#8211;", "-" | replace: "Ã¢â‚¬â€œ", "-" | replace: "Ã¢â‚¬â€", "-" | replace: "â€“", "&mdash;" | replace: "â€”", "&mdash;" | replace: "%", "&#37;" | replace: "Ã‚Â©", "&copy;" | replace: "Ã‚Â®", "&reg;" | replace: "Ã¢â€žÂ¢", "&trade;" | replace: "Ã‚Â£", "&pound;" | replace: "Ã¯Â¿Â", "&#42;" | replace: "Ã¢â‚¬Â¢", "&#42;" | replace: "Ã¢â‚¬Â", "&#39;" | replace: "&#233;", "e" | replace: "Ã©", "e" | replace: "Ã ", "a" | replace: "Ã³", "o" | replace: "Ãª", "e" | replace: "ÃƒËœ", "O" | replace: "&#8482;", "" | replace: "&#174;", "" }}]]></description>
                    {% endif %}
                    <g:image_link>{{product.featured_image | product_img_url: 'large'}}</g:image_link>
                    <link>{{shop.url}}{{product.url}}</link>
                    <g:price>{{product.compare_at_price
                    | money_without_currency}} {{ shop.currency }}</g:price>
  					<g:sale_price>{{product.price | money_without_currency}} {{ shop.currency }}</g:sale_price>
  					{% if product.available %}
  					<g:availibility>In Stock</g:availibility>
  					{% else %}
  					<g:availibility>Out Of Stock</g:availibility>
  					{% endif %}
                    <g:quantity>{% for variant in product.variants limit:1 %}{{ variant.inventory_quantity }}{% endfor %}</g:quantity>
                    <g:google_product_category>{{ DefaultGoogleProductCategory | url_decode  }}</g:google_product_category>
                    {% if additionalImages == '1' %}
                    {% for image in product.images %}
                    <g:additional_image_link>{{ image.src | product_img_url: 'medium' }}</g:additional_image_link>
                    {% endfor %}
                    {% endif %}
                    {% if gtinSubmission == "1" %}
  					{% for variant in product.variants limit:1 %}{% if variant.barcode %}<g:gtin>{{variant.barcode}}</g:gtin>{% endif %}{% endfor %}
					{% endif %}
  					{% for variant in product.variants limit:1 %}{% if variant.sku %}<g:mpn>{{variant.sku | escape}}</g:mpn>{% endif %}{% endfor %}
                    <g:unit_pricing_measure>{{ product.variants.first.weight | weight_with_unit }}</g:unit_pricing_measure>
                    {%- for option in product.options -%}
                      {%- if option contains option1Name -%}
  						 {%- if forloop.index == 1 -%}
                     	 	<g:Color><![CDATA[{{ product.variants.first.option1 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }}]]></g:Color>
  						 {%- elsif forloop.index == 2 -%}
  							<g:Color><![CDATA[{{ product.variants.first.option2 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }}]]></g:Color>
  						 {%- elsif forloop.index == 3 -%}
  							<g:Color><![CDATA[{{ product.variants.first.option3 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }}]]></g:Color>
  						 {% endif %}
                      {% endif %}
  					  {%- if option contains option2Name -%}
  						 {%- if forloop.index == 1 -%}
                     	 <g:Size><![CDATA[{{ product.variants.first.option1 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }}]]></g:Size>
  						{%- elsif forloop.index == 2 -%}
  						<g:Size><![CDATA[{{ product.variants.first.option2 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }}]]></g:Size>
  						{%- elsif forloop.index == 3 -%}
  						<g:Size><![CDATA[{{ product.variants.first.option3 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }}]]></g:Size>
  						{% endif %}
                      {% endif %}
  					  {%- if option contains option3Name -%}
  						 {%- if forloop.index == 1 -%}
                     	 <g:Material><![CDATA[{{ product.variants.first.option1 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }}]]></g:Material>
  						{%- elsif forloop.index == 2 -%}
  						<g:Material><![CDATA[{{ product.variants.first.option2 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }}]]></g:Material>
  						{%- elsif forloop.index == 3 -%}
  						<g:Material><![CDATA[{{ product.variants.first.option3 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }}]]></g:Material>
  						{% endif %}
                      {% endif %}
  					  {%- if option contains option4Name -%}
  						 {%- if forloop.index == 1 -%}
                     	 <g:Style><![CDATA[{{ product.variants.first.option1 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }}]]></g:Style>
  						{%- elsif forloop.index == 2 -%}
  						<g:Style><![CDATA[{{ product.variants.first.option2 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }}]]></g:Style>
  						{%- elsif forloop.index == 3 -%}
  						<g:Style><![CDATA[{{ product.variants.first.option3 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }}]]></g:Style>
  						{% endif %}
                      {% endif %}
  					{% endfor -%}
                </item>
				{% if variantSubmission == 'all' %}
                {% for variant in product.variants %}
                    {% assign product_count = product_count | plus:1 %}
					{% if forloop.first == true %}{% continue %}{% endif %}
				<item>
                    <title>
                    	{% if productTitle == 'default' %}
                    		<![CDATA[{{ product.title | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }} {{ variant.title | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" | replace: "°", "" }}]]>
                    	{% elsif product.metafields.global.title_tag %}
                            {{ product.metafields.global.title_tag | strip_html | strip_newlines | escape }} {{ variant.title | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }}
                        {% else %}
                            <![CDATA[{{ product.title | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }} {{ variant.title | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" | replace: "°", "" }}]]>
                    	{% endif %}
                    </title>
                    <g:brand>{% if brand == 'Domain' %}{{ shop.url }}{% else %}{{product.vendor | escape }}{% endif %}</g:brand>
                    <g:product_type>{{product.type | escape }}</g:product_type>
                   	<g:id>
                        {% if productIdFormat == 'global' %}
                            {{'Shopify_'}}{{shop.currency}}_{{product.id }}_{{variant.id}}
                        {% elsif productIdFormat == 'sku' %}
                            <![CDATA[{{ variant.sku }}]]>
                        {% else %}
                            {{variant.id}}
                        {% endif %}
                    </g:id>
                    <g:condition>{{ productCondition }}</g:condition>
                  	<g:age_group>{{ ageGroup }}</g:age_group>
                    <g:gender>{{ gender }}</g:gender>
                    {% if productdescription == 'default' %}
                    	<description><![CDATA[{{ product.description | strip_html | strip_newlines | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "..", ". " | replace: "  ", " " | replace: "â€˜", "&#39;" | replace: "â€™", "&#39;" | replace: "&#8216;", "&#39;" | replace: "&#8217;", "&#39;" | replace: "&#8217;", "&#39;" | replace: "Ã¢â‚¬â„¢", "&#39;" | replace: "Ã¢â‚¬Å“", "&#39;" | replace: "Ã¢â‚¬Ëœ", "&#39;"  | replace: "Ã‚Â´", "&#39;" | replace: "â€œ", "&#34;" | replace: "â€", "&#34;" | replace: "&#8211;", "-" | replace: "Ã¢â‚¬â€œ", "-" | replace: "Ã¢â‚¬â€", "-" | replace: "â€“", "&mdash;" | replace: "â€”", "&mdash;" | replace: "%", "&#37;" | replace: "Ã‚Â©", "&copy;" | replace: "Ã‚Â®", "&reg;" | replace: "Ã¢â€žÂ¢", "&trade;" | replace: "Ã‚Â£", "&pound;" | replace: "Ã¯Â¿Â", "&#42;" | replace: "Ã¢â‚¬Â¢", "&#42;" | replace: "Ã¢â‚¬Â", "&#39;" | replace: "&#233;", "e" | replace: "Ã©", "e" | replace: "Ã ", "a" | replace: "Ã³", "o" | replace: "Ãª", "e" | replace: "ÃƒËœ", "O" | replace: "&#8482;", "" | replace: "&#174;", "" }}]]></description>
                    {% elsif product.metafields.global.description_tag %}
                    	<description><![CDATA[{{ product.metafields.global.description_tag | strip_html | strip_newlines | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "..", ". " | replace: "  ", " " | replace: "â€˜", "&#39;" | replace: "â€™", "&#39;" | replace: "&#8216;", "&#39;" | replace: "&#8217;", "&#39;" | replace: "&#8217;", "&#39;" | replace: "Ã¢â‚¬â„¢", "&#39;" | replace: "Ã¢â‚¬Å“", "&#39;" | replace: "Ã¢â‚¬Ëœ", "&#39;"  | replace: "Ã‚Â´", "&#39;" | replace: "â€œ", "&#34;" | replace: "â€", "&#34;" | replace: "&#8211;", "-" | replace: "Ã¢â‚¬â€œ", "-" | replace: "Ã¢â‚¬â€", "-" | replace: "â€“", "&mdash;" | replace: "â€”", "&mdash;" | replace: "%", "&#37;" | replace: "Ã‚Â©", "&copy;" | replace: "Ã‚Â®", "&reg;" | replace: "Ã¢â€žÂ¢", "&trade;" | replace: "Ã‚Â£", "&pound;" | replace: "Ã¯Â¿Â", "&#42;" | replace: "Ã¢â‚¬Â¢", "&#42;" | replace: "Ã¢â‚¬Â", "&#39;" | replace: "&#233;", "e" | replace: "Ã©", "e" | replace: "Ã ", "a" | replace: "Ã³", "o" | replace: "Ãª", "e" | replace: "ÃƒËœ", "O" | replace: "&#8482;", "" | replace: "&#174;", "" }}]]></description>
                    {% else %}
                    	<description><![CDATA[{{ product.description | strip_html | strip_newlines | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "..", ". " | replace: "  ", " " | replace: "â€˜", "&#39;" | replace: "â€™", "&#39;" | replace: "&#8216;", "&#39;" | replace: "&#8217;", "&#39;" | replace: "&#8217;", "&#39;" | replace: "Ã¢â‚¬â„¢", "&#39;" | replace: "Ã¢â‚¬Å“", "&#39;" | replace: "Ã¢â‚¬Ëœ", "&#39;"  | replace: "Ã‚Â´", "&#39;" | replace: "â€œ", "&#34;" | replace: "â€", "&#34;" | replace: "&#8211;", "-" | replace: "Ã¢â‚¬â€œ", "-" | replace: "Ã¢â‚¬â€", "-" | replace: "â€“", "&mdash;" | replace: "â€”", "&mdash;" | replace: "%", "&#37;" | replace: "Ã‚Â©", "&copy;" | replace: "Ã‚Â®", "&reg;" | replace: "Ã¢â€žÂ¢", "&trade;" | replace: "Ã‚Â£", "&pound;" | replace: "Ã¯Â¿Â", "&#42;" | replace: "Ã¢â‚¬Â¢", "&#42;" | replace: "Ã¢â‚¬Â", "&#39;" | replace: "&#233;", "e" | replace: "Ã©", "e" | replace: "Ã ", "a" | replace: "Ã³", "o" | replace: "Ãª", "e" | replace: "ÃƒËœ", "O" | replace: "&#8482;", "" | replace: "&#174;", "" }}]]></description>
                    {% endif %}
                    {% if variant.image %}
                    <g:image_link>{{ variant.image.src | product_img_url: 'large'}}</g:image_link>
                    {% else %}
                    <g:image_link>{{product.featured_image | product_img_url: 'large'}}</g:image_link>
                    {% endif %}
                    <link>{{shop.url}}{{product.url}}?variant={{ variant.id }}</link>
                    <g:price>{{variant.compare_at_price | money_without_currency}} {{ shop.currency }}</g:price>
  					<g:sale_price>{{variant.price | money_without_currency}} {{ shop.currency }}</g:sale_price>
  					{% if variant.available %}
  					<g:availibility>In Stock</g:availibility>
  					{% else %}
  					<g:availibility>Out Of Stock</g:availibility>
  					{% endif %}
                    <g:quantity>{{ variant.inventory_quantity }}</g:quantity>
                    <g:google_product_category>{{ getCategory }}</g:google_product_category>
					{% if gtinSubmission == "1" %}
  					{% if variant.barcode %}<g:gtin>{{variant.barcode}}</g:gtin>{% endif %}
					{% endif %}
  					{% if variant.sku %}<g:mpn>{{variant.sku | escape}}</g:mpn>{% endif %}
                    <g:unit_pricing_measure>{{ variant.weight | weight_with_unit }}</g:unit_pricing_measure>
                    {%- for option in product.options -%}
                      {%- if option contains option1Name -%}
  						 {%- if forloop.index == 1 -%}
						 	<g:Color><![CDATA[ {{ variant.option1 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }} ]]></g:Color>
						 {%- elsif forloop.index == 2 -%}
						 	<g:Color><![CDATA[ {{ variant.option2 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }} ]]></g:Color>
						 {%- elsif forloop.index == 3 -%}
						 	<g:Color><![CDATA[ {{ variant.option3 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }} ]]></g:Color>
						{% endif %}
                      {% endif %}
                      {%- if option contains option2Name  -%}
  						 {%- if forloop.index == 1 -%}
						 	<g:Size><![CDATA[ {{ variant.option1 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }} ]]></g:Size>
						 {%- elsif forloop.index == 2 -%}
						 	<g:Size><![CDATA[ {{ variant.option2 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }} ]]></g:Size>
						 {%- elsif forloop.index == 3 -%}
						 	<g:Size><![CDATA[ {{ variant.option3 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }} ]]></g:Size>
						{% endif %}
                      {% endif %}
					  {%- if option contains option3Name -%}
  						 {%- if forloop.index == 1 -%}
						 	<g:Material><![CDATA[ {{ variant.option1 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }} ]]></g:Material>
						 {%- elsif forloop.index == 2 -%}
						 	<g:Material><![CDATA[ {{ variant.option2 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }} ]]></g:Material>
						 {%- elsif forloop.index == 3 -%}
						 	<g:Material><![CDATA[ {{ variant.option3 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }} ]]></g:Material>
						{% endif %}
                      {% endif %}
					  {%- if option contains option4Name -%}
  						 {%- if forloop.index == 1 -%}
						 	<g:Style><![CDATA[ {{ variant.option1 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }} ]]></g:Style>
						 {%- elsif forloop.index == 2 -%}
						 	<g:Style><![CDATA[ {{ variant.option2 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }} ]]></g:Style>
						 {%- elsif forloop.index == 3 -%}
						 	<g:Style><![CDATA[ {{ variant.option3 | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&#38;', 'and' | replace: "Ã©", "e" | replace: "Ã ", "a" }} ]]></g:Style>
						{% endif %}
                      {% endif %}
  					{% endfor %}
				</item>
                {% endfor %}
				{% endif %}
            {% endfor %}
        {% endpaginate %}
    </channel>
</rss>
